﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace ProjectThuCung.Models
{
    public class BaiViet
    {
        [Key]
        public int BaiVietID { get; set; }
        
        [Required]
        public int UserId { get; set; }

        [Required]
        [MaxLength(56)]
        [Display(Name = "Người viết")]
        public String TenNguoiViet { get; set; }

        [Required]
        [MaxLength(128)]
        [Display(Name = "Tên tiêu đề")]
        public String TieuDe { get; set; }

        [Required]
        [Display(Name = "Nội dung")]
        public String NoiDung { get; set; }

        [Required]
        [Display(Name = "Thời gian")]
        public DateTime ThoiGian { get; set; }

        public virtual UserProfile UserProfile { get; set; }

        public virtual ICollection<BinhLuanBaiViet> BinhLuanBaiViets { get; set; }
    }
}